package com.zhenhua.client.view;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import com.eltima.components.ui.DatePicker;

import utils.DateTimeChooser;

import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JRadioButton;

public class AddExamRecordDialog extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private JTextField textField;
	private DateTimeChooser dateTimeChooser=new DateTimeChooser();
	private DatePicker datePicker=dateTimeChooser.getDatePicker();
	private JTextField textField_1;
	private JTextField textField_2;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			AddExamRecordDialog dialog = new AddExamRecordDialog();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public AddExamRecordDialog() {
		setTitle("\u6DFB\u52A0\u8003\u8BD5\u8BB0\u5F55");
		setBounds(100, 100, 377, 372);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JLabel label = new JLabel("\u5B66\u5458\u7F16\u53F7\uFF1A");
			label.setBounds(83, 70, 93, 18);
			contentPanel.add(label);
		}
		{
			textField = new JTextField();
			textField.setBounds(165, 67, 86, 24);
			contentPanel.add(textField);
			textField.setColumns(10);
		}
		{
			JLabel label = new JLabel("\u8003\u8BD5\u79D1\u76EE\uFF1A");
			label.setBounds(83, 101, 86, 18);
			contentPanel.add(label);
		}
		{
			JComboBox comboBox = new JComboBox();
			comboBox.setBounds(165, 101, 86, 24);
			contentPanel.add(comboBox);
		}
		{
			JLabel label = new JLabel("\u8003\u8BD5\u65E5\u671F\uFF1A");
			label.setBounds(83, 132, 93, 18);
			contentPanel.add(label);
			
			datePicker.setBounds(160, 133, 150, 20);
			contentPanel.add(datePicker);
		}
		{
			JLabel label = new JLabel("\u8003\u8BD5\u7ED3\u679C\uFF1A");
			label.setBounds(83, 163, 86, 18);
			contentPanel.add(label);
		}
		{
			textField_1 = new JTextField();
			textField_1.setBounds(165, 163, 86, 24);
			contentPanel.add(textField_1);
			textField_1.setColumns(10);
		}
		{
			JLabel label = new JLabel("\u662F\u5426\u901A\u8FC7\uFF1A");
			label.setBounds(83, 194, 93, 18);
			contentPanel.add(label);
		}
		
		JRadioButton radioButton = new JRadioButton("\u662F");
		radioButton.setBounds(165, 190, 56, 27);
		contentPanel.add(radioButton);
		{
			JRadioButton radioButton_1 = new JRadioButton("\u5426");
			radioButton_1.setBounds(226, 190, 50, 27);
			contentPanel.add(radioButton_1);
		}
		{
			JLabel label = new JLabel("\u6559\u7EC3\u7F16\u53F7\uFF1A");
			label.setBounds(83, 225, 86, 18);
			contentPanel.add(label);
		}
		{
			textField_2 = new JTextField();
			textField_2.setBounds(165, 225, 86, 24);
			contentPanel.add(textField_2);
			textField_2.setColumns(10);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("\u786E\u5B9A");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("\u53D6\u6D88");
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
	}
}
